1. Field of the Invention
The present invention relates generally to software code compliers, and more particularly, to methods and systems for just-in-time (JIT) compilers.
2. Description of the Related Art
Java source code is typically complied by a Java compiler to produce a corresponding Java byte code. The Java byte code can also be further compiled at run time to produce a machine or native code. The native code can then be executed on the processor. By way of example, an application that is written in Java can be compiled in a Java compiler to produce Java byte code for the application. When the Java byte code is selected for execution (i.e., launched), the Java byte code is further compiled to produce the native code. The native code can then be executed much quicker than the Java byte code by the processor.
Unfortunately, the above process can often produce native code that cannot be efficiently executed on the processor. By way of example, often branching instructions in the Java byte code or the native code can result in stalls or bubbles in the execution in the processor. As a result the application does not execute as quickly as it could and the overall performance of the computing device suffers.
This problem can be substantially exacerbated when the processor is customized for a particular application. By way of example, a processor in a handheld device (e.g., personal digital assistant (PDA), a cellular telephone, etc.) has substantially customized functionality when compared to a typical desktop personal computer or a server computer or other general-purpose computer. As a result, any stalls or bubbles in the execution of instructions by the processor can substantially impact the performance of the handheld device. In view of the foregoing, there is a need for a more efficient compilation process and system to substantially reduce the any stalls or bubbles in the execution pipeline of the processor.